<template>
    <div class="View">
        <div class="row">
            <div class="label">
                機種
            </div>
            <el-select class="long-ipt" v-model="macStyle.ctgCode" placeholder=" " @change="getOptionsList">
                <el-option v-for="item in ComBox.ctgList" :key="item.key" :label="item.label" :value="item.key">
                </el-option>
            </el-select>
        </div>
        <div class="row">
            <div class="label">
                個別機種
            </div>
            <el-select class="long-ipt" v-model="macStyle.stCode" placeholder=" ">
                <el-option v-for="item in ComBox.stList" :key="item.label" :label="item.label" :value="item.label">
                </el-option>
            </el-select>
        </div>
        <div class="row">
            <div class="label">
                コロージョンループ
            </div>
            <el-select class="long-ipt" v-model="macStyle.proKbnCode" placeholder=" ">
                <el-option v-for="item in ComBox.proKbnList" :key="item.key" :label="item.label" :value="item.key">
                </el-option>
            </el-select>
        </div>
        <div class="row">
            <div class="label">
                ブロック
            </div>
            <el-select class="long-ipt" v-model="macStyle.sysCode" placeholder=" ">
                <el-option v-for="item in ComBox.sysList" :key="item.key" :label="item.label" :value="item.key">
                </el-option>
            </el-select>
        </div>
        <div class="row">
            <div class="label">
                適用法規
            </div>
            <el-select class="long-ipt" v-model="macStyle.lawCode" placeholder=" ">
                <el-option v-for="item in ComBox.lawList" :key="item.key" :label="item.label" :value="item.key">
                </el-option>
            </el-select>
        </div>
        <div class="row">
            <div class="label">
                検査工事目的
            </div>
            <el-select class="long-ipt" v-model="macStyle.factorCode" placeholder=" ">
                <el-option v-for="item in ComBox.factorList" :key="item.key" :label="item.label" :value="item.key">
                </el-option>
            </el-select>
        </div>
        <div class="row">
            <div class="label">
                検査工事項目
            </div>
            <el-select class="long-ipt" v-model="macStyle.ispClsCode" placeholder=" ">
                <el-option v-for="item in ComBox.ispClsList" :key="item.key" :label="item.label" :value="item.key">
                </el-option>
            </el-select>
        </div>
        <div class="row">
            <div class="label">
                損傷要因
            </div>
            <el-select class="long-ipt" v-model="macStyle.causeOfInjuryName" placeholder=" ">
                <el-option v-for="item in ComBox.causeOfInjuryList" :key="item.key" :label="item.label" :value="item.key">
                </el-option>
            </el-select>
        </div>
        <div class="row">
            <div class="label">
                保全方式
            </div>
            <el-select class="long-ipt" v-model="macStyle.consysCode" placeholder=" ">
                <el-option v-for="item in ComBox.consysList" :key="item.key" :label="item.label" :value="item.key">
                </el-option>
            </el-select>
        </div>
        <div class="row">
            <div class="label">
                重災管理
            </div>
            <el-select class="long-ipt" v-model="macStyle.worstHitCode" placeholder=" ">
                <el-option v-for="item in ComBox.worstHitList" :key="item.key" :label="item.label" :value="item.key">
                </el-option>
            </el-select>
        </div>

    </div>
</template>

<script>
import $ from "jquery";
import { getLocalStorage } from "@/utils/storage";
import { getExtCodSourceCombox, getExtCodSourceByUser, extCodSourceByUser } from "@/api/api";
import eventBus from "@/eventBus/bus";
export default {
    name: "RetrievalTab1",
    props: ['macStyle', 'ComBox'],
    data() {
        return {
            format: "yyyy-MM",
        };
    },
    components: {},
    watch: {},
    methods: {
        async save() {
            console.log(this.macStyle, '11111');
            console.log(this.ComBox, '11111');
        },

        async getOptionsList() {
            // let dataJson = {
            //     Account: getLocalStorage('userName'),//	是	string	登录账号
            //     PltCode: this.$store.state.pltCode,//	是	int	装置Code
            //     PrnCode: this.macStyle.ctgCode,//	是	int	カテゴリCode
            // }
            // let res = await getExtCodSourceCombox(dataJson);
            // this.ComBox = res.data.data.macStyle;
            this.macStyle.stCode = 0;
            this.$emit('extractionCondComboxApi', this.macStyle.ctgCode)
        },
    },
    created() { },
    mounted() {

    },
    beforeDestroy() {
        eventBus.$off("clearData_CH");
    },
    destroyed() { },
};
</script>
<style  lang="scss" scoped>
.row {
    width: 100%;
    display: flex;
    // justify-content: start;
    padding: 7px 0;
    align-items: center;
    padding-left: 16px;

    .label {
        // width: 145px;
        min-width: 145px;
        height: 32px;
        display: flex;
        align-items: center;
    }

    .ipt {
        width: 380px;

        ::v-deep .el-input__inner {
            width: 100%;
            height: 32px;

        }
    }

    .right {

        ::v-deep .el-input__inner {
            text-align: right;

        }
    }

    .long-ipt {
        width: 380px;
        height: 32px;

        ::v-deep .el-input__inner {
            width: 100%;
            height: 32px;
        }

        ::v-deep .el-input__inner:focus {
            border: 1px solid #dcdfe6;
        }

        ::v-deep .el-input__icon {
            line-height: 32px;
            color: #909399;
        }

        ::v-deep .el-input__suffix {
            width: 32px;
            right: 0;
            background: #dee0e3;
        }
    }

    .picker {
        // width: 175px;
        height: 32px;
        // margin: 0px 10px;

        ::v-deep .el-input__inner {
            width: 100%;
            height: 32px;
        }

        ::v-deep .el-input__suffix {
            background: transparent;
        }

        ::v-deep .el-input__icon {
            line-height: 100%;
        }
    }

}
</style>